12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295 |
- (() => {
- var exports = {};
- exports.id = 61991;
- exports.ids = [61991,64820];
- exports.modules = {
- /***/ 96887:
- /***/ ((module, __webpack_exports__, __webpack_require__) => {
- "use strict";
- __webpack_require__.a(module, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try {
- __webpack_require__.r(__webpack_exports__);
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
- /* harmony export */ "default": () => (/* binding */ pageWrapperTemplate),
- /* harmony export */ "getServerSideProps": () => (/* binding */ getServerSideProps),
- /* harmony export */ "getStaticProps": () => (/* binding */ getStaticProps)
- /* harmony export */ });
- /* harmony import */ var _sentry_server_config_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(96270);
- /* harmony import */ var _sentry_nextjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(58097);
- /* harmony import */ var _sentry_nextjs__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_sentry_nextjs__WEBPACK_IMPORTED_MODULE_1__);
- /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(20997);
- /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__);
- /* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(71853);
- /* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(next_router__WEBPACK_IMPORTED_MODULE_3__);
- /* harmony import */ var next_translate_Trans__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(74137);
- /* harmony import */ var next_translate_Trans__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(next_translate_Trans__WEBPACK_IMPORTED_MODULE_4__);
- /* harmony import */ var next_translate_useTranslation__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(60866);
- /* harmony import */ var next_translate_useTranslation__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(next_translate_useTranslation__WEBPACK_IMPORTED_MODULE_5__);
- /* harmony import */ var _lessons_module_scss__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(55696);
- /* harmony import */ var _lessons_module_scss__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(_lessons_module_scss__WEBPACK_IMPORTED_MODULE_19__);
- /* harmony import */ var _components_Auth_withAuth__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(1223);
- /* harmony import */ var _components_Course_LessonView__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(89591);
- /* harmony import */ var _components_DataFetcher__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(12951);
- /* harmony import */ var _components_NextSeoWrapper__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(25869);
- /* harmony import */ var _components_PageContainer__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(9234);
- /* harmony import */ var _dls_Link_Link__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(61239);
- /* harmony import */ var _dls_Spinner_Spinner__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(7190);
- /* harmony import */ var _pages_index_module_scss__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(23848);
- /* harmony import */ var _pages_index_module_scss__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(_pages_index_module_scss__WEBPACK_IMPORTED_MODULE_18__);
- /* harmony import */ var _types_ApiErrorMessage__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(43194);
- /* harmony import */ var _utils_auth_api__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(37883);
- /* harmony import */ var _utils_auth_apiPaths__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(13830);
- /* harmony import */ var _utils_eventLogger__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(55943);
- /* harmony import */ var _utils_navigation__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(57933);
- var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_components_Auth_withAuth__WEBPACK_IMPORTED_MODULE_6__, _components_Course_LessonView__WEBPACK_IMPORTED_MODULE_7__, _components_DataFetcher__WEBPACK_IMPORTED_MODULE_8__, _utils_eventLogger__WEBPACK_IMPORTED_MODULE_16__, _utils_navigation__WEBPACK_IMPORTED_MODULE_17__]);
- ([_components_Auth_withAuth__WEBPACK_IMPORTED_MODULE_6__, _components_Course_LessonView__WEBPACK_IMPORTED_MODULE_7__, _components_DataFetcher__WEBPACK_IMPORTED_MODULE_8__, _utils_eventLogger__WEBPACK_IMPORTED_MODULE_16__, _utils_navigation__WEBPACK_IMPORTED_MODULE_17__] = __webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__);
- const Loading = ()=>/*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("div", {
- className: (_pages_index_module_scss__WEBPACK_IMPORTED_MODULE_18___default().loadingContainer),
- children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_dls_Spinner_Spinner__WEBPACK_IMPORTED_MODULE_12__/* ["default"] */ .Z, {})
- });
- const LessonPage = ()=>{
- const { lang } = next_translate_useTranslation__WEBPACK_IMPORTED_MODULE_5___default()("learn");
- const router = (0,next_router__WEBPACK_IMPORTED_MODULE_3__.useRouter)();
- const { slug , lessonSlugOrId } = router.query;
- const onUnEnrolledNavigationLinkClicked = ()=>{
- (0,_utils_eventLogger__WEBPACK_IMPORTED_MODULE_16__/* .logButtonClick */ .MY)("unenrolled_course_link", {
- courseSlugOrId: slug,
- lessonSlugOrId
- });
- };
- const renderError = (error)=>{
- if (error?.message === _types_ApiErrorMessage__WEBPACK_IMPORTED_MODULE_13__/* ["default"].CourseNotEnrolled */ .Z.CourseNotEnrolled) {
- return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("div", {
- className: (_lessons_module_scss__WEBPACK_IMPORTED_MODULE_19___default().container),
- children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_components_PageContainer__WEBPACK_IMPORTED_MODULE_10__/* ["default"] */ .Z, {
- children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)((next_translate_Trans__WEBPACK_IMPORTED_MODULE_4___default()), {
- i18nKey: "learn:not-enrolled",
- components: {
- link: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_dls_Link_Link__WEBPACK_IMPORTED_MODULE_11__/* ["default"] */ .Z, {
- onClick: onUnEnrolledNavigationLinkClicked,
- href: (0,_utils_navigation__WEBPACK_IMPORTED_MODULE_17__/* .getCourseNavigationUrl */ .ES)(slug),
- variant: _dls_Link_Link__WEBPACK_IMPORTED_MODULE_11__/* .LinkVariant.Blend */ .r.Blend
- }, 0)
- }
- })
- })
- });
- }
- return undefined;
- };
- const bodyRenderer = (lesson)=>{
- if (lesson) {
- return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.Fragment, {
- children: [
- /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_components_NextSeoWrapper__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .Z, {
- title: lesson.title,
- url: (0,_utils_navigation__WEBPACK_IMPORTED_MODULE_17__/* .getCanonicalUrl */ .Z2)(lang, (0,_utils_navigation__WEBPACK_IMPORTED_MODULE_17__/* .getLessonNavigationUrl */ .dC)(slug, lessonSlugOrId))
- }),
- /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_components_Course_LessonView__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .Z, {
- lesson: lesson,
- lessonSlugOrId: lessonSlugOrId,
- courseSlug: slug
- })
- ]
- });
- }
- return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.Fragment, {});
- };
- return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("div", {
- className: (_pages_index_module_scss__WEBPACK_IMPORTED_MODULE_18___default().pageContainer),
- children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_components_DataFetcher__WEBPACK_IMPORTED_MODULE_8__/* ["default"] */ .Z, {
- loading: Loading,
- queryKey: (0,_utils_auth_apiPaths__WEBPACK_IMPORTED_MODULE_15__/* .makeGetLessonUrl */ .Gk)(slug, lessonSlugOrId),
- fetcher: _utils_auth_api__WEBPACK_IMPORTED_MODULE_14__/* .privateFetcher */ .UK,
- renderError: renderError,
- render: bodyRenderer
- })
- });
- };
- var __SENTRY_WRAPPING_TARGET_FILE__ = (0,_components_Auth_withAuth__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z)(LessonPage);
- var serverComponentModule = /*#__PURE__*/Object.freeze({
- __proto__: null,
- 'default': __SENTRY_WRAPPING_TARGET_FILE__
- });
- /*
- * This file is a template for the code which will be substituted when our webpack loader handles non-API files in the
- * `pages/` directory.
- *
- * We use `__SENTRY_WRAPPING_TARGET_FILE__.cjs` as a placeholder for the path to the file being wrapped. Because it's not a real package,
- * this causes both TS and ESLint to complain, hence the pragma comments below.
- */
- const userPageModule = serverComponentModule ;
- const pageComponent = userPageModule ? userPageModule.default : undefined;
- const origGetInitialProps = pageComponent ? pageComponent.getInitialProps : undefined;
- const origGetStaticProps = userPageModule ? userPageModule.getStaticProps : undefined;
- const origGetServerSideProps = userPageModule ? userPageModule.getServerSideProps : undefined;
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
- const getInitialPropsWrappers = {
- '/_app': _sentry_nextjs__WEBPACK_IMPORTED_MODULE_1__.wrapAppGetInitialPropsWithSentry,
- '/_document': _sentry_nextjs__WEBPACK_IMPORTED_MODULE_1__.wrapDocumentGetInitialPropsWithSentry,
- '/_error': _sentry_nextjs__WEBPACK_IMPORTED_MODULE_1__.wrapErrorGetInitialPropsWithSentry,
- };
- const getInitialPropsWrapper = getInitialPropsWrappers['/learning-plans/[slug]/lessons/[lessonSlugOrId]'] || _sentry_nextjs__WEBPACK_IMPORTED_MODULE_1__.wrapGetInitialPropsWithSentry;
- if (pageComponent && typeof origGetInitialProps === 'function') {
- pageComponent.getInitialProps = getInitialPropsWrapper(origGetInitialProps) ;
- }
- const getStaticProps =
- typeof origGetStaticProps === 'function'
- ? _sentry_nextjs__WEBPACK_IMPORTED_MODULE_1__.wrapGetStaticPropsWithSentry(origGetStaticProps, '/learning-plans/[slug]/lessons/[lessonSlugOrId]')
- : undefined;
- const getServerSideProps =
- typeof origGetServerSideProps === 'function'
- ? _sentry_nextjs__WEBPACK_IMPORTED_MODULE_1__.wrapGetServerSidePropsWithSentry(origGetServerSideProps, '/learning-plans/[slug]/lessons/[lessonSlugOrId]')
- : undefined;
- const pageWrapperTemplate = pageComponent ? _sentry_nextjs__WEBPACK_IMPORTED_MODULE_1__.wrapPageComponentWithSentry(pageComponent ) : pageComponent;
- __webpack_async_result__();
- } catch(e) { __webpack_async_result__(e); } });
- /***/ }),
- /***/ 49880:
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- "use strict";
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
- /* harmony export */ "Z": () => (__WEBPACK_DEFAULT_EXPORT__)
- /* harmony export */ });
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(16689);
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
- var _path;
- function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
- var SvgChevronLeft = function SvgChevronLeft(props) {
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("svg", _extends({
- width: 15,
- height: 15,
- viewBox: "0 0 15 15",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg"
- }, props), _path || (_path = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("path", {
- d: "M8.842 3.135a.5.5 0 0 1 .023.707L5.435 7.5l3.43 3.658a.5.5 0 0 1-.73.684l-3.75-4a.5.5 0 0 1 0-.684l3.75-4a.5.5 0 0 1 .707-.023Z",
- fill: "currentColor",
- fillRule: "evenodd",
- clipRule: "evenodd"
- })));
- };
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (SvgChevronLeft);
- /***/ }),
- /***/ 3932:
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- "use strict";
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
- /* harmony export */ "Z": () => (__WEBPACK_DEFAULT_EXPORT__)
- /* harmony export */ });
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(16689);
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
- var _path;
- function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
- var SvgChevronRight = function SvgChevronRight(props) {
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("svg", _extends({
- width: 15,
- height: 15,
- viewBox: "0 0 15 15",
- fill: "none",
- xmlns: "http://www.w3.org/2000/svg"
- }, props), _path || (_path = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("path", {
- d: "M6.158 3.135a.5.5 0 0 1 .707.023l3.75 4a.5.5 0 0 1 0 .684l-3.75 4a.5.5 0 1 1-.73-.684L9.566 7.5l-3.43-3.658a.5.5 0 0 1 .023-.707Z",
- fill: "currentColor",
- fillRule: "evenodd",
- clipRule: "evenodd"
- })));
- };
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (SvgChevronRight);
- /***/ }),
- /***/ 77266:
- /***/ ((module) => {
- // Exports
- module.exports = {
- "buttonsContainer": "ActionButtons_buttonsContainer__8sYFk",
- "addReflectionButton": "ActionButtons_addReflectionButton__a87_E"
- };
- /***/ }),
- /***/ 91493:
- /***/ ((module) => {
- // Exports
- module.exports = {
- "container": "CourseMaterial_container__woIAL",
- "modalContainer": "CourseMaterial_modalContainer__XHCOl",
- "heading": "CourseMaterial_heading__m2XoE",
- "currentLesson": "CourseMaterial_currentLesson__jCz_g",
- "lessonContainer": "CourseMaterial_lessonContainer__bHHIg",
- "day": "CourseMaterial_day__FMLIb"
- };
- /***/ }),
- /***/ 31123:
- /***/ ((module) => {
- // Exports
- module.exports = {
- "viewContainer": "Lesson_viewContainer__KU3Kw",
- "modalHeading": "Lesson_modalHeading__MRE72",
- "container": "Lesson_container__pKSFk",
- "backText": "Lesson_backText__BqDit",
- "headerContainer": "Lesson_headerContainer__ccO73",
- "title": "Lesson_title__7kl3n",
- "tickIcon": "Lesson_tickIcon__ML0oE",
- "contentContainer": "Lesson_contentContainer__P16lZ",
- "headerButtonsContainer": "Lesson_headerButtonsContainer__ASxer",
- "courseMaterialButton": "Lesson_courseMaterialButton__jS61z"
- };
- /***/ }),
- /***/ 55696:
- /***/ ((module) => {
- // Exports
- module.exports = {
- "container": "lessons_container__O0LbF"
- };
- /***/ }),
- /***/ 69971:
- /***/ ((module, __webpack_exports__, __webpack_require__) => {
- "use strict";
- __webpack_require__.a(module, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try {
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
- /* harmony export */ "Z": () => (__WEBPACK_DEFAULT_EXPORT__)
- /* harmony export */ });
- /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(20997);
- /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__);
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(16689);
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
- /* harmony import */ var next_translate_useTranslation__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(60866);
- /* harmony import */ var next_translate_useTranslation__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(next_translate_useTranslation__WEBPACK_IMPORTED_MODULE_2__);
- /* harmony import */ var _dls_Button_Button__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(50497);
- /* harmony import */ var _dls_Toast_Toast__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(79717);
- /* harmony import */ var _utils_eventLogger__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(55943);
- var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_dls_Button_Button__WEBPACK_IMPORTED_MODULE_3__, _dls_Toast_Toast__WEBPACK_IMPORTED_MODULE_4__, _utils_eventLogger__WEBPACK_IMPORTED_MODULE_5__]);
- ([_dls_Button_Button__WEBPACK_IMPORTED_MODULE_3__, _dls_Toast_Toast__WEBPACK_IMPORTED_MODULE_4__, _utils_eventLogger__WEBPACK_IMPORTED_MODULE_5__] = __webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__);
- const CompleteButton = ({ isLoading , id , markLessonAsCompleted })=>{
- const { t } = next_translate_useTranslation__WEBPACK_IMPORTED_MODULE_2___default()("learn");
- const toast = (0,_dls_Toast_Toast__WEBPACK_IMPORTED_MODULE_4__/* .useToast */ .pm)();
- const onMarkAsCompletedClicked = ()=>{
- (0,_utils_eventLogger__WEBPACK_IMPORTED_MODULE_5__/* .logButtonClick */ .MY)("mark_lesson_as_completed", {
- lessonId: id
- });
- markLessonAsCompleted(id, ()=>{
- toast(t("mark-complete-success"), {
- status: _dls_Toast_Toast__WEBPACK_IMPORTED_MODULE_4__/* .ToastStatus.Success */ .YZ.Success
- });
- });
- };
- return /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(_dls_Button_Button__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .ZP, {
- isLoading: isLoading,
- isDisabled: isLoading,
- size: _dls_Button_Button__WEBPACK_IMPORTED_MODULE_3__/* .ButtonSize.Small */ .qE.Small,
- onClick: onMarkAsCompletedClicked,
- children: t("mark-complete")
- });
- };
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (CompleteButton);
- __webpack_async_result__();
- } catch(e) { __webpack_async_result__(e); } });
- /***/ }),
- /***/ 27666:
- /***/ ((module, __webpack_exports__, __webpack_require__) => {
- "use strict";
- __webpack_require__.a(module, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try {
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
- /* harmony export */ "Z": () => (__WEBPACK_DEFAULT_EXPORT__)
- /* harmony export */ });
- /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(20997);
- /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__);
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(16689);
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
- /* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(71853);
- /* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(next_router__WEBPACK_IMPORTED_MODULE_2__);
- /* harmony import */ var next_translate_useTranslation__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(60866);
- /* harmony import */ var next_translate_useTranslation__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(next_translate_useTranslation__WEBPACK_IMPORTED_MODULE_3__);
- /* harmony import */ var _ActionButtons_module_scss__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(77266);
- /* harmony import */ var _ActionButtons_module_scss__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(_ActionButtons_module_scss__WEBPACK_IMPORTED_MODULE_18__);
- /* harmony import */ var _CompleteButton__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(69971);
- /* harmony import */ var _components_Course_CourseFeedback__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(18370);
- /* harmony import */ var _components_Course_utils_mutations__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(82969);
- /* harmony import */ var _dls_Button_Button__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(50497);
- /* harmony import */ var _dls_Toast_Toast__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(79717);
- /* harmony import */ var _hooks_useMutateMultipleKeys__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(46181);
- /* harmony import */ var _hooks_useMutateWithoutRevalidation__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(61368);
- /* harmony import */ var _hooks_useScrollToTop__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(73742);
- /* harmony import */ var _icons_chevron_left_svg__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(49880);
- /* harmony import */ var _icons_chevron_right_svg__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(3932);
- /* harmony import */ var _types_auth_ActivityDay__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(97043);
- /* harmony import */ var _utils_auth_api__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(37883);
- /* harmony import */ var _utils_eventLogger__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(55943);
- /* harmony import */ var _utils_navigation__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(57933);
- var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_CompleteButton__WEBPACK_IMPORTED_MODULE_4__, _components_Course_CourseFeedback__WEBPACK_IMPORTED_MODULE_5__, _dls_Button_Button__WEBPACK_IMPORTED_MODULE_7__, _dls_Toast_Toast__WEBPACK_IMPORTED_MODULE_8__, _hooks_useMutateMultipleKeys__WEBPACK_IMPORTED_MODULE_9__, _hooks_useMutateWithoutRevalidation__WEBPACK_IMPORTED_MODULE_10__, _utils_eventLogger__WEBPACK_IMPORTED_MODULE_15__, _utils_navigation__WEBPACK_IMPORTED_MODULE_16__]);
- ([_CompleteButton__WEBPACK_IMPORTED_MODULE_4__, _components_Course_CourseFeedback__WEBPACK_IMPORTED_MODULE_5__, _dls_Button_Button__WEBPACK_IMPORTED_MODULE_7__, _dls_Toast_Toast__WEBPACK_IMPORTED_MODULE_8__, _hooks_useMutateMultipleKeys__WEBPACK_IMPORTED_MODULE_9__, _hooks_useMutateWithoutRevalidation__WEBPACK_IMPORTED_MODULE_10__, _utils_eventLogger__WEBPACK_IMPORTED_MODULE_15__, _utils_navigation__WEBPACK_IMPORTED_MODULE_16__] = __webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__);
- const ActionButtons = ({ lesson , courseSlug })=>{
- const scrollToTop = (0,_hooks_useScrollToTop__WEBPACK_IMPORTED_MODULE_17__/* ["default"] */ .Z)();
- const { day , id , isFirst , isLast , course , isCompleted } = lesson;
- const router = (0,next_router__WEBPACK_IMPORTED_MODULE_2__.useRouter)();
- const { t } = next_translate_useTranslation__WEBPACK_IMPORTED_MODULE_3___default()("learn");
- const mutateWithoutRevalidation = (0,_hooks_useMutateWithoutRevalidation__WEBPACK_IMPORTED_MODULE_10__/* ["default"] */ .Z)();
- const mutateMultipleKeys = (0,_hooks_useMutateMultipleKeys__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .Z)();
- const { 0: isLoading , 1: setIsLoading } = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false);
- const toast = (0,_dls_Toast_Toast__WEBPACK_IMPORTED_MODULE_8__/* .useToast */ .pm)();
- const { 0: shouldOpenFeedbackModal , 1: setShouldOpenFeedbackModal } = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false);
- const markLessonAsCompleted = (lessonId, successCallback)=>{
- setIsLoading(true);
- (0,_utils_auth_api__WEBPACK_IMPORTED_MODULE_14__/* .updateActivityDay */ .i1)({
- type: _types_auth_ActivityDay__WEBPACK_IMPORTED_MODULE_13__/* .ActivityDayType.LESSON */ .t.LESSON,
- lessonId
- }).then(()=>{
- (0,_components_Course_utils_mutations__WEBPACK_IMPORTED_MODULE_6__/* .mutateCachedLessonsAfterCompletion */ .z1)(mutateMultipleKeys, courseSlug, lessonId);
- (0,_components_Course_utils_mutations__WEBPACK_IMPORTED_MODULE_6__/* .mutateCachedCourseAfterCompletion */ .gx)(mutateWithoutRevalidation, courseSlug, lessonId);
- if (successCallback) {
- successCallback();
- }
- // check if the last lesson of the course is completed, and ask user for feedback
- const completedLessonsCount = course.lessons.filter((filterLesson)=>filterLesson.isCompleted).length;
- const isLastCompletedLessonOfCourse = completedLessonsCount === course.lessons.length;
- if (isLastCompletedLessonOfCourse) {
- setShouldOpenFeedbackModal(true);
- }
- }).catch(()=>{
- toast(t("common:error.general"), {
- status: _dls_Toast_Toast__WEBPACK_IMPORTED_MODULE_8__/* .ToastStatus.Error */ .YZ.Error
- });
- }).finally(()=>{
- setIsLoading(false);
- });
- };
- const navigateToLesson = (navigateToCourseSlug, navigateToLessonSlug)=>{
- router.push((0,_utils_navigation__WEBPACK_IMPORTED_MODULE_16__/* .getLessonNavigationUrl */ .dC)(navigateToCourseSlug, navigateToLessonSlug));
- };
- const onPreviousLessonClicked = ()=>{
- (0,_utils_eventLogger__WEBPACK_IMPORTED_MODULE_15__/* .logButtonClick */ .MY)("previous_lesson", {
- lessonId: id,
- isCompleted
- });
- const lessonIndex = day - 1;
- const previousLessonSlug = course.lessons[lessonIndex - 1].slug;
- scrollToTop();
- navigateToLesson(course.slug, previousLessonSlug);
- };
- const onNextLessonClicked = ()=>{
- (0,_utils_eventLogger__WEBPACK_IMPORTED_MODULE_15__/* .logButtonClick */ .MY)("next_lesson", {
- lessonId: id,
- isCompleted
- });
- const lessonIndex = day - 1;
- const nextLessonSlug = course.lessons[lessonIndex + 1].slug;
- scrollToTop();
- navigateToLesson(course.slug, nextLessonSlug);
- };
- const onAddReflectionClick = ()=>{
- (0,_utils_eventLogger__WEBPACK_IMPORTED_MODULE_15__/* .logButtonClick */ .MY)("add_lesson_reflection", {
- lessonId: id,
- isCompleted
- });
- };
- const shouldShowAddFeedbackButton = course?.userHasFeedback === false && (course?.isCompleted === true || shouldOpenFeedbackModal === true);
- return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {
- children: [
- /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", {
- className: (_ActionButtons_module_scss__WEBPACK_IMPORTED_MODULE_18___default().buttonsContainer),
- children: [
- !isFirst && /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(_dls_Button_Button__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .ZP, {
- isLoading: isLoading,
- isDisabled: isLoading,
- size: _dls_Button_Button__WEBPACK_IMPORTED_MODULE_7__/* .ButtonSize.Small */ .qE.Small,
- onClick: onPreviousLessonClicked,
- children: /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(_icons_chevron_left_svg__WEBPACK_IMPORTED_MODULE_11__/* ["default"] */ .Z, {})
- }),
- !isCompleted && /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(_CompleteButton__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Z, {
- id: id,
- isLoading: isLoading,
- markLessonAsCompleted: markLessonAsCompleted
- }),
- !isLast && /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(_dls_Button_Button__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .ZP, {
- isLoading: isLoading,
- isDisabled: isLoading,
- size: _dls_Button_Button__WEBPACK_IMPORTED_MODULE_7__/* .ButtonSize.Small */ .qE.Small,
- onClick: onNextLessonClicked,
- children: /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(_icons_chevron_right_svg__WEBPACK_IMPORTED_MODULE_12__/* ["default"] */ .Z, {})
- })
- ]
- }),
- /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", {
- className: (_ActionButtons_module_scss__WEBPACK_IMPORTED_MODULE_18___default().addReflectionButton),
- children: [
- /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(_dls_Button_Button__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .ZP, {
- size: _dls_Button_Button__WEBPACK_IMPORTED_MODULE_7__/* .ButtonSize.Small */ .qE.Small,
- onClick: onAddReflectionClick,
- href: "https://quranreflect.com",
- isNewTab: true,
- type: _dls_Button_Button__WEBPACK_IMPORTED_MODULE_7__/* .ButtonType.Success */ .L$.Success,
- children: t("add-reflection")
- }),
- shouldShowAddFeedbackButton && /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(_components_Course_CourseFeedback__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .Z, {
- shouldOpenModal: shouldOpenFeedbackModal,
- course: course,
- source: _components_Course_CourseFeedback__WEBPACK_IMPORTED_MODULE_5__/* .FeedbackSource.LessonPage */ .E.LessonPage
- })
- ]
- })
- ]
- });
- };
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ActionButtons);
- __webpack_async_result__();
- } catch(e) { __webpack_async_result__(e); } });
- /***/ }),
- /***/ 12596:
- /***/ ((module, __webpack_exports__, __webpack_require__) => {
- "use strict";
- __webpack_require__.a(module, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try {
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
- /* harmony export */ "Z": () => (__WEBPACK_DEFAULT_EXPORT__)
- /* harmony export */ });
- /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(20997);
- /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__);
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(16689);
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
- /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(59003);
- /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_2__);
- /* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(71853);
- /* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(next_router__WEBPACK_IMPORTED_MODULE_3__);
- /* harmony import */ var next_translate_useTranslation__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(60866);
- /* harmony import */ var next_translate_useTranslation__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(next_translate_useTranslation__WEBPACK_IMPORTED_MODULE_4__);
- /* harmony import */ var _CourseMaterial_module_scss__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(91493);
- /* harmony import */ var _CourseMaterial_module_scss__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_CourseMaterial_module_scss__WEBPACK_IMPORTED_MODULE_9__);
- /* harmony import */ var _components_Course_CompletedTick__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(86120);
- /* harmony import */ var _utils_eventLogger__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(55943);
- /* harmony import */ var _utils_locale__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(24709);
- /* harmony import */ var _utils_navigation__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(57933);
- var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_utils_eventLogger__WEBPACK_IMPORTED_MODULE_6__, _utils_navigation__WEBPACK_IMPORTED_MODULE_8__]);
- ([_utils_eventLogger__WEBPACK_IMPORTED_MODULE_6__, _utils_navigation__WEBPACK_IMPORTED_MODULE_8__] = __webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__);
- const CourseMaterial = ({ lessons , currentLessonId , courseSlug , isModal =false , })=>{
- const { t , lang } = next_translate_useTranslation__WEBPACK_IMPORTED_MODULE_4___default()("learn");
- const router = (0,next_router__WEBPACK_IMPORTED_MODULE_3__.useRouter)();
- const onLessonClicked = (lessonId, slug)=>{
- (0,_utils_eventLogger__WEBPACK_IMPORTED_MODULE_6__/* .logButtonClick */ .MY)("sidebar_syllabus_lesson", {
- lessonId,
- courseSlug
- });
- router.push((0,_utils_navigation__WEBPACK_IMPORTED_MODULE_8__/* .getLessonNavigationUrl */ .dC)(courseSlug, slug));
- };
- return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", {
- className: classnames__WEBPACK_IMPORTED_MODULE_2___default()((_CourseMaterial_module_scss__WEBPACK_IMPORTED_MODULE_9___default().container), {
- [(_CourseMaterial_module_scss__WEBPACK_IMPORTED_MODULE_9___default().modalContainer)]: isModal
- }),
- children: [
- !isModal && /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("p", {
- className: (_CourseMaterial_module_scss__WEBPACK_IMPORTED_MODULE_9___default().heading),
- children: t("learning-plan-material")
- }),
- lessons.map((lesson, index)=>{
- const dayNumber = index + 1;
- const { title , isCompleted , id , slug } = lesson;
- const onClickHandler = ()=>{
- onLessonClicked(id, slug);
- };
- return /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("div", {
- role: "button",
- tabIndex: index,
- onClick: onClickHandler,
- onKeyDown: onClickHandler,
- className: classnames__WEBPACK_IMPORTED_MODULE_2___default()((_CourseMaterial_module_scss__WEBPACK_IMPORTED_MODULE_9___default().lessonContainer), {
- [(_CourseMaterial_module_scss__WEBPACK_IMPORTED_MODULE_9___default().currentLesson)]: id === currentLessonId
- }),
- children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", {
- children: [
- /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("span", {
- className: (_CourseMaterial_module_scss__WEBPACK_IMPORTED_MODULE_9___default().day),
- children: `${(0,_utils_locale__WEBPACK_IMPORTED_MODULE_7__/* .toLocalizedNumber */ .rQ)(dayNumber, lang)}: `
- }),
- /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("span", {
- children: [
- title,
- isCompleted ? /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(_components_Course_CompletedTick__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .Z, {}) : ""
- ]
- })
- ]
- })
- }, id);
- })
- ]
- });
- };
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (CourseMaterial);
- __webpack_async_result__();
- } catch(e) { __webpack_async_result__(e); } });
- /***/ }),
- /***/ 89591:
- /***/ ((module, __webpack_exports__, __webpack_require__) => {
- "use strict";
- __webpack_require__.a(module, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try {
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
- /* harmony export */ "Z": () => (__WEBPACK_DEFAULT_EXPORT__)
- /* harmony export */ });
- /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(20997);
- /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__);
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(16689);
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
- /* harmony import */ var _milkdown_react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(76915);
- /* harmony import */ var next_translate_useTranslation__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(60866);
- /* harmony import */ var next_translate_useTranslation__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(next_translate_useTranslation__WEBPACK_IMPORTED_MODULE_3__);
- /* harmony import */ var _ActionButtons__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(27666);
- /* harmony import */ var _CourseMaterial__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(12596);
- /* harmony import */ var _Lesson_module_scss__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(31123);
- /* harmony import */ var _Lesson_module_scss__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(_Lesson_module_scss__WEBPACK_IMPORTED_MODULE_15__);
- /* harmony import */ var _components_Course_ContentContainer__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(79215);
- /* harmony import */ var _components_MarkdownEditor__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(3177);
- /* harmony import */ var _components_PageContainer__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(9234);
- /* harmony import */ var _dls_Button_Button__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(50497);
- /* harmony import */ var _dls_ContentModal_ContentModal__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(66606);
- /* harmony import */ var _icons_west_svg__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(58421);
- /* harmony import */ var _utils_eventLogger__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(55943);
- /* harmony import */ var _utils_locale__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(24709);
- /* harmony import */ var _utils_navigation__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(57933);
- var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_milkdown_react__WEBPACK_IMPORTED_MODULE_2__, _ActionButtons__WEBPACK_IMPORTED_MODULE_4__, _CourseMaterial__WEBPACK_IMPORTED_MODULE_5__, _components_MarkdownEditor__WEBPACK_IMPORTED_MODULE_7__, _dls_Button_Button__WEBPACK_IMPORTED_MODULE_9__, _dls_ContentModal_ContentModal__WEBPACK_IMPORTED_MODULE_10__, _utils_eventLogger__WEBPACK_IMPORTED_MODULE_12__, _utils_navigation__WEBPACK_IMPORTED_MODULE_14__]);
- ([_milkdown_react__WEBPACK_IMPORTED_MODULE_2__, _ActionButtons__WEBPACK_IMPORTED_MODULE_4__, _CourseMaterial__WEBPACK_IMPORTED_MODULE_5__, _components_MarkdownEditor__WEBPACK_IMPORTED_MODULE_7__, _dls_Button_Button__WEBPACK_IMPORTED_MODULE_9__, _dls_ContentModal_ContentModal__WEBPACK_IMPORTED_MODULE_10__, _utils_eventLogger__WEBPACK_IMPORTED_MODULE_12__, _utils_navigation__WEBPACK_IMPORTED_MODULE_14__] = __webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__);
- const LessonView = ({ lesson , courseSlug , lessonSlugOrId })=>{
- const { title , content , day } = lesson;
- const { t , lang } = next_translate_useTranslation__WEBPACK_IMPORTED_MODULE_3___default()("learn");
- const { 0: isCourseMaterialModalOpen , 1: setCourseMaterialModalOpen } = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false);
- const onBackButtonClicked = ()=>{
- (0,_utils_eventLogger__WEBPACK_IMPORTED_MODULE_12__/* .logButtonClick */ .MY)("back_to_course", {
- lessonSlugOrId,
- courseSlug
- });
- };
- const onCourseMaterialClicked = ()=>{
- (0,_utils_eventLogger__WEBPACK_IMPORTED_MODULE_12__/* .logButtonClick */ .MY)("course_material", {
- lessonSlugOrId,
- courseSlug
- });
- setCourseMaterialModalOpen(true);
- };
- return /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(_components_Course_ContentContainer__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z, {
- children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", {
- className: (_Lesson_module_scss__WEBPACK_IMPORTED_MODULE_15___default().viewContainer),
- children: [
- /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(_dls_ContentModal_ContentModal__WEBPACK_IMPORTED_MODULE_10__/* ["default"] */ .Z, {
- isOpen: isCourseMaterialModalOpen,
- onClose: ()=>{
- setCourseMaterialModalOpen(false);
- },
- hasCloseButton: true,
- header: /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("p", {
- className: (_Lesson_module_scss__WEBPACK_IMPORTED_MODULE_15___default().modalHeading),
- children: t("learning-plan-material")
- }),
- children: /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(_CourseMaterial__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .Z, {
- isModal: true,
- courseSlug: courseSlug,
- currentLessonId: lesson.id,
- lessons: lesson.course.lessons
- })
- }),
- /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(_CourseMaterial__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .Z, {
- courseSlug: courseSlug,
- currentLessonId: lesson.id,
- lessons: lesson.course.lessons
- }),
- /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("div", {
- className: (_Lesson_module_scss__WEBPACK_IMPORTED_MODULE_15___default().container),
- children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components_PageContainer__WEBPACK_IMPORTED_MODULE_8__/* ["default"] */ .Z, {
- children: [
- /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", {
- className: (_Lesson_module_scss__WEBPACK_IMPORTED_MODULE_15___default().headerButtonsContainer),
- children: [
- /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_dls_Button_Button__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .ZP, {
- onClick: onBackButtonClicked,
- href: (0,_utils_navigation__WEBPACK_IMPORTED_MODULE_14__/* .getCourseNavigationUrl */ .ES)(courseSlug),
- variant: _dls_Button_Button__WEBPACK_IMPORTED_MODULE_9__/* .ButtonVariant.Ghost */ .Wu.Ghost,
- children: [
- /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(_icons_west_svg__WEBPACK_IMPORTED_MODULE_11__/* ["default"] */ .Z, {}),
- /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("p", {
- className: (_Lesson_module_scss__WEBPACK_IMPORTED_MODULE_15___default().backText),
- children: t("back-to-learning-plan")
- })
- ]
- }),
- /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(_dls_Button_Button__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .ZP, {
- onClick: onCourseMaterialClicked,
- variant: _dls_Button_Button__WEBPACK_IMPORTED_MODULE_9__/* .ButtonVariant.Ghost */ .Wu.Ghost,
- className: (_Lesson_module_scss__WEBPACK_IMPORTED_MODULE_15___default().courseMaterialButton),
- children: t("learning-plan-material")
- })
- ]
- }),
- /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("div", {
- className: (_Lesson_module_scss__WEBPACK_IMPORTED_MODULE_15___default().headerContainer),
- children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("p", {
- className: (_Lesson_module_scss__WEBPACK_IMPORTED_MODULE_15___default().title),
- children: [
- `${t("day")} ${(0,_utils_locale__WEBPACK_IMPORTED_MODULE_13__/* .toLocalizedNumber */ .rQ)(day, lang)}`,
- `: ${title}`
- ]
- })
- }),
- /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("div", {
- className: (_Lesson_module_scss__WEBPACK_IMPORTED_MODULE_15___default().contentContainer),
- children: /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(_milkdown_react__WEBPACK_IMPORTED_MODULE_2__.MilkdownProvider, {
- children: /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(_components_MarkdownEditor__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .Z, {
- isEditable: false,
- defaultValue: content
- })
- })
- }),
- /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(_ActionButtons__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Z, {
- lesson: lesson,
- courseSlug: courseSlug
- })
- ]
- })
- })
- ]
- })
- });
- };
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (LessonView);
- __webpack_async_result__();
- } catch(e) { __webpack_async_result__(e); } });
- /***/ }),
- /***/ 73742:
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- "use strict";
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
- /* harmony export */ "Z": () => (__WEBPACK_DEFAULT_EXPORT__)
- /* harmony export */ });
- const useScrollToTop = ()=>{
- // a function that will be invoked by the component using this hook to scroll to the top of the window.
- const scrollToTop = ()=>{
- if (false) {}
- };
- return scrollToTop;
- };
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (useScrollToTop);
- /***/ }),
- /***/ 43194:
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
- "use strict";
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
- /* harmony export */ "Z": () => (__WEBPACK_DEFAULT_EXPORT__)
- /* harmony export */ });
- var ApiErrorMessage;
- (function(ApiErrorMessage) {
- ApiErrorMessage["CourseNotEnrolled"] = "You are not enrolled in this course";
- })(ApiErrorMessage || (ApiErrorMessage = {}));
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ApiErrorMessage);
- /***/ }),
- /***/ 75184:
- /***/ ((module) => {
- "use strict";
- module.exports = require("@reduxjs/toolkit");
- /***/ }),
- /***/ 58097:
- /***/ ((module) => {
- "use strict";
- module.exports = require("@sentry/nextjs");
- /***/ }),
- /***/ 59003:
- /***/ ((module) => {
- "use strict";
- module.exports = require("classnames");
- /***/ }),
- /***/ 59606:
- /***/ ((module) => {
- "use strict";
- module.exports = require("humps");
- /***/ }),
- /***/ 59969:
- /***/ ((module) => {
- "use strict";
- module.exports = require("lodash/capitalize");
- /***/ }),
- /***/ 12372:
- /***/ ((module) => {
- "use strict";
- module.exports = require("lodash/findKey");
- /***/ }),
- /***/ 98492:
- /***/ ((module) => {
- "use strict";
- module.exports = require("lodash/groupBy");
- /***/ }),
- /***/ 35526:
- /***/ ((module) => {
- "use strict";
- module.exports = require("lodash/random");
- /***/ }),
- /***/ 64042:
- /***/ ((module) => {
- "use strict";
- module.exports = require("lodash/range");
- /***/ }),
- /***/ 16641:
- /***/ ((module) => {
- "use strict";
- module.exports = require("next-seo");
- /***/ }),
- /***/ 74137:
- /***/ ((module) => {
- "use strict";
- module.exports = require("next-translate/Trans");
- /***/ }),
- /***/ 60866:
- /***/ ((module) => {
- "use strict";
- module.exports = require("next-translate/useTranslation");
- /***/ }),
- /***/ 3280:
- /***/ ((module) => {
- "use strict";
- module.exports = require("next/dist/shared/lib/app-router-context.js");
- /***/ }),
- /***/ 92796:
- /***/ ((module) => {
- "use strict";
- module.exports = require("next/dist/shared/lib/head-manager-context.js");
- /***/ }),
- /***/ 3539:
- /***/ ((module) => {
- "use strict";
- module.exports = require("next/dist/shared/lib/i18n/detect-domain-locale.js");
- /***/ }),
- /***/ 34014:
- /***/ ((module) => {
- "use strict";
- module.exports = require("next/dist/shared/lib/i18n/normalize-locale-path.js");
- /***/ }),
- /***/ 78524:
- /***/ ((module) => {
- "use strict";
- module.exports = require("next/dist/shared/lib/is-plain-object.js");
- /***/ }),
- /***/ 78020:
- /***/ ((module) => {
- "use strict";
- module.exports = require("next/dist/shared/lib/mitt.js");
- /***/ }),
- /***/ 64406:
- /***/ ((module) => {
- "use strict";
- module.exports = require("next/dist/shared/lib/page-path/denormalize-page-path.js");
- /***/ }),
- /***/ 24964:
- /***/ ((module) => {
- "use strict";
- module.exports = require("next/dist/shared/lib/router-context.js");
- /***/ }),
- /***/ 93431:
- /***/ ((module) => {
- "use strict";
- module.exports = require("next/dist/shared/lib/router/utils/add-locale.js");
- /***/ }),
- /***/ 11751:
- /***/ ((module) => {
- "use strict";
- module.exports = require("next/dist/shared/lib/router/utils/add-path-prefix.js");
- /***/ }),
- /***/ 46220:
- /***/ ((module) => {
- "use strict";
- module.exports = require("next/dist/shared/lib/router/utils/compare-states.js");
- /***/ }),
- /***/ 10299:
- /***/ ((module) => {
- "use strict";
- module.exports = require("next/dist/shared/lib/router/utils/format-next-pathname-info.js");
- /***/ }),
- /***/ 23938:
- /***/ ((module) => {
- "use strict";
- module.exports = require("next/dist/shared/lib/router/utils/format-url.js");
- /***/ }),
- /***/ 29565:
- /***/ ((module) => {
- "use strict";
- module.exports = require("next/dist/shared/lib/router/utils/get-asset-path-from-route.js");
- /***/ }),
- /***/ 35789:
- /***/ ((module) => {
- "use strict";
- module.exports = require("next/dist/shared/lib/router/utils/get-next-pathname-info.js");
- /***/ }),
- /***/ 1897:
- /***/ ((module) => {
- "use strict";
- module.exports = require("next/dist/shared/lib/router/utils/is-bot.js");
- /***/ }),
- /***/ 1428:
- /***/ ((module) => {
- "use strict";
- module.exports = require("next/dist/shared/lib/router/utils/is-dynamic.js");
- /***/ }),
- /***/ 28854:
- /***/ ((module) => {
- "use strict";
- module.exports = require("next/dist/shared/lib/router/utils/parse-path.js");
- /***/ }),
- /***/ 91292:
- /***/ ((module) => {
- "use strict";
- module.exports = require("next/dist/shared/lib/router/utils/parse-relative-url.js");
- /***/ }),
- /***/ 34567:
- /***/ ((module) => {
- "use strict";
- module.exports = require("next/dist/shared/lib/router/utils/path-has-prefix.js");
- /***/ }),
- /***/ 80979:
- /***/ ((module) => {
- "use strict";
- module.exports = require("next/dist/shared/lib/router/utils/querystring.js");
- /***/ }),
- /***/ 93297:
- /***/ ((module) => {
- "use strict";
- module.exports = require("next/dist/shared/lib/router/utils/remove-trailing-slash.js");
- /***/ }),
- /***/ 36052:
- /***/ ((module) => {
- "use strict";
- module.exports = require("next/dist/shared/lib/router/utils/resolve-rewrites.js");
- /***/ }),
- /***/ 84226:
- /***/ ((module) => {
- "use strict";
- module.exports = require("next/dist/shared/lib/router/utils/route-matcher.js");
- /***/ }),
- /***/ 95052:
- /***/ ((module) => {
- "use strict";
- module.exports = require("next/dist/shared/lib/router/utils/route-regex.js");
- /***/ }),
- /***/ 59232:
- /***/ ((module) => {
- "use strict";
- module.exports = require("next/dist/shared/lib/utils.js");
- /***/ }),
- /***/ 71853:
- /***/ ((module) => {
- "use strict";
- module.exports = require("next/router");
- /***/ }),
- /***/ 16689:
- /***/ ((module) => {
- "use strict";
- module.exports = require("react");
- /***/ }),
- /***/ 20997:
- /***/ ((module) => {
- "use strict";
- module.exports = require("react/jsx-runtime");
- /***/ }),
- /***/ 52648:
- /***/ ((module) => {
- "use strict";
- module.exports = require("refresh-fetch");
- /***/ }),
- /***/ 57964:
- /***/ ((module) => {
- "use strict";
- module.exports = import("@milkdown/core");;
- /***/ }),
- /***/ 42154:
- /***/ ((module) => {
- "use strict";
- module.exports = import("@milkdown/preset-commonmark");;
- /***/ }),
- /***/ 76915:
- /***/ ((module) => {
- "use strict";
- module.exports = import("@milkdown/react");;
- /***/ }),
- /***/ 64744:
- /***/ ((module) => {
- "use strict";
- module.exports = import("@milkdown/utils");;
- /***/ }),
- /***/ 11601:
- /***/ ((module) => {
- "use strict";
- module.exports = import("@radix-ui/react-checkbox");;
- /***/ }),
- /***/ 77715:
- /***/ ((module) => {
- "use strict";
- module.exports = import("@radix-ui/react-dialog");;
- /***/ }),
- /***/ 4086:
- /***/ ((module) => {
- "use strict";
- module.exports = import("@radix-ui/react-radio-group");;
- /***/ }),
- /***/ 66704:
- /***/ ((module) => {
- "use strict";
- module.exports = import("@radix-ui/react-tooltip");;
- /***/ }),
- /***/ 28560:
- /***/ ((module) => {
- "use strict";
- module.exports = import("@radix-ui/react-visually-hidden");;
- /***/ }),
- /***/ 88813:
- /***/ ((module) => {
- "use strict";
- module.exports = import("firebase/compat/analytics");;
- /***/ }),
- /***/ 33773:
- /***/ ((module) => {
- "use strict";
- module.exports = import("firebase/compat/app");;
- /***/ }),
- /***/ 69915:
- /***/ ((module) => {
- "use strict";
- module.exports = import("js-cookie");;
- /***/ }),
- /***/ 45641:
- /***/ ((module) => {
- "use strict";
- module.exports = import("react-hook-form");;
- /***/ }),
- /***/ 3590:
- /***/ ((module) => {
- "use strict";
- module.exports = import("react-toastify");;
- /***/ }),
- /***/ 15941:
- /***/ ((module) => {
- "use strict";
- module.exports = import("swr");;
- /***/ }),
- /***/ 79847:
- /***/ ((module) => {
- "use strict";
- module.exports = import("swr/immutable");;
- /***/ }),
- /***/ 63477:
- /***/ ((module) => {
- "use strict";
- module.exports = require("querystring");
- /***/ })
- };
- ;
- // load runtime
- var __webpack_require__ = require("../../../../webpack-runtime.js");
- __webpack_require__.C(exports);
- var __webpack_exec__ = (moduleId) => (__webpack_require__(__webpack_require__.s = moduleId))
- var __webpack_exports__ = __webpack_require__.X(0, [11497,79165,96270,24709,57933,61239,25869,50497,76410,79717,13830,37883,22197,12951,91308,42752,37013,1223,87574], () => (__webpack_exec__(96887)));
- module.exports = __webpack_exports__;
- })();
- //# sourceMappingURL=[lessonSlugOrId].js.map
|